
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObject;
using DataAccessLayer;

namespace BusinessLogic
{
    /// <summary>
    /// Define SubCategoryUtil class. This class user for BussinessLayer.

    /// </summary>
    public class SubCategoryUtil
    {
        /// <summary>
        /// Define function Insert for SubCategory Object.
        /// </summary>
        /// <param name="t">object data need Insert.</param>
        /// <returns>
        ///    True: if insert successfull.
        ///    False: if insert error.
        ///</returns>
        public static bool Insert(SubCategory t)
        {

            return SubCategoryDao.Insert(t);
        }
        /// <summary>
        /// Define function Update for SubCategory Object.
        /// </summary>
        /// <param name="t">project data need updated.</param>
        /// <returns>
        ///    True: if update successful.
        ///    False: if update Error.
        ///</returns>
        public static bool Update(SubCategory t)
        {

            return SubCategoryDao.Update(t);
        }
        /// <summary>
        /// Get All SubCategory object from table SubCategory.
        /// </summary>
        /// <returns>List SubCategory object.</returns>
        public static List<SubCategory> GetAll()
        {
            return SubCategoryDao.GetAll();
        }
        /// <summary>
        /// Search SubCategory object in table SubCategory.
        /// </summary>
        /// <param name="t">Condition for Search.</param>

        /// <returns>List SubCategory objects.</returns>

        public static List<SubCategory> SearchSubCategory(SubCategory t, string LanguageId)
        {
            return SubCategoryDao.SearchSubCategory(t, LanguageId);
        }
        /// <summary>
        /// Get a SubCategory data object by primary key. 
        /// </summary>
        /// <param name="subCategoryId" >This is primary key.</param>
        /// <returns>A SubCategory object.</returns>

        public static SubCategory Get(int subCategoryId)
        {
            return SubCategoryDao.Get(subCategoryId);
        }
        /// <summary>
        /// This function to Delete SubCategory object by primary key.
        /// </summary>
        /// <param name="subCategoryId" >This is primary key.</param>
        /// <returns>If succesful return True else  return False.</returns>

        public static bool Delete(int subCategoryId)
        {

            return SubCategoryDao.Delete(subCategoryId);
        }
        public static bool Order(int SubCategoryId, int type)
        {
            return SubCategoryDao.Order(SubCategoryId, type);
        }
        public static bool Publish(int SubCategoryId)
        {
            return SubCategoryDao.Publish(SubCategoryId);
        }
        public static List<SubCategory> GetAllSubCategoryByCategory(int cateId, string languageId)
        {
            return SubCategoryDao.GetAllSubCategoryByCategory(cateId, languageId);
        }
    }
}